function test(person) {
    person.age = 26
    person = {
        name: '1hzj',
        age: 18
    }
    return person
}

const p1 = {
    name: 'efyq',
    age: 19
}

const p2 = test(p1)
console.log(p1) // ->  {name: 'efyq',age: 19}
console.log(p2) // ->  {name: '1hzj',age: 18}

//----------------------
//2.
setTimeout(function() {
    console.log(1)
}, 0);
new Promise(function(resolve, reject) {
    console.log(2)
    for (var i = 0; i < 10000; i++) {
        if(i === 10) {
            console.log(10)
        }
        i == 9999 && resolve();
    }
    console.log(3)
}).then(function() {
    console.log(4)
})
console.log(5);

//  2  3 10 4 5 1












